{% load static %}
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>{% block title %}base html{% endblock title %}</title>
    <meta name="description" content="{% block description %}description{% endblock description %}">
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
          integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="{% static 'css/base.css' %}">
    <link rel="stylesheet" href="{% static 'css/bootstrap-off-canvas-nav.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static 'css/jquery.datetimepicker.min.css' %}" >
</head>

<body class="off-canvas-nav-left">
<div class="container-fluid">
    <div class="row">
        <div class="col-2 bg-light" id="height_col">
            <div class="container sticky-top" id="navbar_container">
                <nav class="navbar navbar-light bg-light flex-column">
                    <a class="navbar-brand" href="#">学生信息管理系统</a>
                    {% block navbar_left %}
                        <div class="navbar-nav">
                            <a class="nav-item nav-link active" href="{% url 'sims:index' %}">主页<span
                                    class="sr-only">(current)</span></a>
                            <a class="nav-item nav-link" href="{% url 'sims:schedule' %}">日程安排</a>
                            <a class="nav-item nav-link" href="{% url 'sims:to_do' %}">待办事项</a>
                            <a class="nav-item nav-link" href="{% url 'sims:history' %}">历史活动</a>
                            <a class="nav-item nav-link" href="{% url 'sims:user_control' %}">个人中心</a>
                        </div>
                    {% endblock %}
                </nav>
            </div>
        </div>
        <div class="col-10 pr-0">
            <div class="container-fluid sticky-top mx-0 px-0">

                <nav class="navbar navbar-light bg-light navbar-expand">
                    <div class="navbar-nav">
                        {% block navbar_top %}
                            <a class="nav-item nav-link active" href="{% url 'sims:index' %}">主页</a>
                        {% endblock %}
                    </div>
                    <div class="btn-group float-right d-block" role="group" aria-label="logged-in">
                        <button type="button" class="btn btn-light my-2 mx-2 my-sm-0" data-toggle="tooltip"
                                data-placement="bottom" title="欢迎, {{ request.session.user_name }}"
                                onclick="window.location.href='{% url 'sims:user_control' %}'"><i
                                class="fa fa-user-circle fa-lg" aria-hidden="true"></i></button>
                        <button class="btn btn-light my-2 mx-2 my-sm-0" data-toggle="modal"
                                data-target="#logout">
                            <i class="fa fa-sign-in fa-lg" aria-hidden="true"></i>
                        </button>
                    </div>
                </nav>
            </div>
            <!-- 登出 -->
            <div class="modal fade" id="logout" tabindex="-100" role="dialog" aria-labelledby="logoutLabel"
                 aria-hidden="true">
                <div class="modal-dialog" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title" id="logoutLabel">退出登录</h5>
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                <span aria-hidden="true">&times;</span>
                            </button>
                        </div>
                        <div class="modal-body">
                            您确认要退出当前账号吗?
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-dismiss="modal">我再想想</button>
                            <button type="button" class="btn btn-success"
                                    onclick="window.location.href='{% url 'sims:logout' %}'">
                                退出登录
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <div class="container-fluid">
                {% block body_content %}
                    页面内容
                {% endblock %}
            </div>
        </div>
    </div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
        integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
        integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous">
</script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
        integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous">
</script>
<script src="https://kit.fontawesome.com/9900f8e783.js" crossorigin="anonymous"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/javascript.util/0.12.8/javascript.util.min.js"></script>
<script src="{% static 'js/jquery.datetimepicker.full.min.js' %}"></script>
<script src="{% static 'js/bootstrap-off-canvas-nav.js' %}" async defer></script>
<script src="{% static 'js/dateTime.js' %}"></script>
</body>

</html>